# -*- coding: utf-8 -*-
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from app.config import Config

config = Config()
DATABASE_URL = config.mysql_url 

engine = create_engine(DATABASE_URL)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)

def init_db():
    pass
    # 创建所有表（仅当表不存在时）
    # Base.metadata.create_all(bind=engine)